function rowStyle(row, index) {
  var classes = ['active', 'success', 'info', 'warning', 'danger'];

  if (index % 2 === 0 && index / 2 < classes.length) {
    return {
      classes: classes[index / 2]
    };
  }
  return {};
}


$(document).ready(function(){
   var _maxHeight = $container().height();

  $('#btnAdd').click(function(){
    $('#modal-form').modal({
      show:true,
      backdrop:false
    });
  });

  $('#modal-form').on('hide.bs.modal',function(){
    alert('关闭模态窗口!');
  });

   $('#table').bootstrapTable({
     url: _CTX_ + '/static/json/table_data.json',
     method:'get',
     height: _maxHeight - 210,
     pagination: true,
     pageNumber: 1,
     pageSize: 20,
     pageList: [20,50,100],
     clickToSelect: true,
     columns:[{
          radio:true
        },{
         field: 'name',
         title: '姓名'
       },{
         field: 'star',
         title: '关注度'
       },{
         field: 'license',
         title: '许可方式'
       },{
         field: 'description',
         title: '描述'
       },{
         field: 'url',
         title: '链接地址',
         visible: false
       }
     ]
   })

})

